//
//  APhttpUtil.m
//  Qihuo
//
//  Created by Vencoo on 13-10-11.
//  Copyright (c) 2013年 Vencoo. All rights reserved.
//

#import "APhttpUtil.h"

@implementation APhttpUtil
//新闻
+(ASIHTTPRequest *)queryNewsID:(NSString *)ID pageNo:(NSInteger)pageNo
{
    ASIFormDataRequest *queryRequest = [ASIFormDataRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:queryNew_IP,ID,pageNo]]];
    
    return queryRequest;
}
+(ASIHTTPRequest *)buildAddNewsName:(NSString *)name content:(NSString *)content crtUser:(NSString *)crtUser userID:(NSString *)userID
{
    
    ASIFormDataRequest *addRequest = [ASIFormDataRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:addNews_IP,name,content,crtUser,userID]]];
    
    return addRequest;
}
+(ASIHTTPRequest *)builddeleteNews:(NSString *)ID
{
    ASIFormDataRequest *deleteRequest = [ASIFormDataRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:deleteNews_IP,ID]]];
    
    return deleteRequest;
}
//紧急事件
+ (ASIHTTPRequest *)queryEmergencyDate:(NSString *)date pageNumer:(NSInteger)pageNum
{
    ASIFormDataRequest *addRequest = [ASIFormDataRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:queryEmergencies_IP,date,pageNum]]];
    
    return addRequest;
}
+ (ASIHTTPRequest *)buildEditNewsId:(NSString*)ID name:(NSString *)name content:(NSString *)content crtUser:(NSString *)crtUser userID:(NSString *)userID
{
    ASIFormDataRequest *editRequest = [ASIFormDataRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:editNews_IP,ID,name,content,crtUser,userID]]];
    return editRequest;
}
+ (ASIHTTPRequest *)AddEmergencySystemcase:(NSString *)systemcase address:(NSString *)address reporting:(NSString *)reporting handle:(NSString *)handle result:(NSString *)result userID:(NSString *)userID
{
    ASIHTTPRequest *addEmergenciesRequest = [ASIHTTPRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:addEmergencies,systemcase,address,reporting,handle,result,userID]]];
    return addEmergenciesRequest;
}
+ (ASIHTTPRequest *)UpdateEmergenciesId:(NSString *)ID systemCase:(NSString *)systemCase address:(NSString *)address reporting:(NSString *)reporting handle:(NSString *)handle result:(NSString *)result userID:(NSString *)userID
{
    ASIFormDataRequest *updateEmergenceReq = [ASIFormDataRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:updateEmergencies,ID,systemCase,address,reporting,handle,result,userID]]];
    return updateEmergenceReq;
}
//资料库
+ (ASIHTTPRequest *)queryResourceInfoOfPageNum:(NSString *)pageNum pageSize:(NSString *)pageSize
{
    ASIFormDataRequest *queryRequest = [ASIFormDataRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:queryResource,pageNum,pageSize]]];
    return queryRequest;
}
@end
